package ${packageName};

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;

import ${applicationPackage}.R;
<#if generateBasePager>
import ${packageName}.activity.BasePagerActivity;
</#if>
import java.util.ArrayList;
import java.util.List;

/**
 * 继承BasePagerActivity
 * <p>
 * ${activityLabel}
 */
public class ${activityClass} extends BasePagerActivity{

<#if generateLayout>
   @Override
    public int initContentView(@Nullable Bundle savedInstanceState) {
        return R.layout.${layoutName};
    }
</#if>
	@Override
    protected List<Fragment> pagerFragment() {
        List<Fragment> list = new ArrayList<>();
//      list.add(new TabBar1Fragment());
//      list.add(new TabBar2Fragment());
        return list;
    }

    @Override
    protected List<String> pagerTitleString() {
        List<String> list = new ArrayList<>();
//        list.add("page1");
//        list.add("page2");
        return list;
    }

    @Override
    protected void initView(ViewPager viewPager, TabLayout tabs) {
        tabs.setTabTextColors(getResources().getColor(R.color.textColorHint), getResources().getColor(R.color.textColor));
        tabs.setSelectedTabIndicatorColor(getResources().getColor(R.color.colorAccent));
        tabs.setTabMode(TabLayout.MODE_FIXED);
        tabs.setTabGravity(TabLayout.GRAVITY_FILL);
    }
}
